fix(check-workflows): mock action-artifacts capability probe endpoints#2450
Closed
matthiasL-scality wants to merge 1 commit into
Closed
fix(check-workflows): mock action-artifacts capability probe endpoints#2450matthiasL-scality wants to merge 1 commit into
matthiasL-scality wants to merge 1 commit into
Conversation
action-artifacts@4.3.0+ probes /presign-upload/ and /presign-upload-part/ before every upload to detect presigned/multipart capability. Without these nock intercepts the tests throw ERR_NOCK_NO_MATCH. Reply 404 so the action falls back to the standard upload path. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
8905316 to
5231b5a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
action-artifacts@4.3.0 added a capability probe that fires a GET to `/presign-upload/capability-probe/probe.bin` and `/presign-upload-part/capability-probe/probe.bin` before every upload, to detect presigned/multipart upload support. These endpoints are not yet deployed (pending PTFE-3137 and PTFE-3219).
When `v4` was pointed at 4.3.0, the `check-workflows` CI broke with `ERR_NOCK_NO_MATCH` because nock had no interceptor for the probe requests. The tag was rolled back as a temporary fix.
Changes
Add `presignUpload` and `presignUploadPart` endpoints to the `Mockapi` definition in `archive-artifacts.spec.ts`, and mock them with 404 in `commonMockApi()`. A 404 response makes the action fall back to the standard upload path, keeping existing tests valid.
How to validate
Once PTFE-3137 and PTFE-3219 are merged and `action-artifacts` is re-released with the probe: